package com.alpaak.eurekafeignclient.controller;

import com.alpaak.eurekafeignclient.service.HiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: spring-cloud-demo
 * @className: HiController
 * @description:
 * @author: alpaak
 * @create: 2019-05-04 14:13
 **/

@RestController
public class HiController {
    @Autowired
    private HiService hiService;

    @GetMapping("/hi")
    public String sayHi(@RequestParam(defaultValue = "alpaak",required = false)String name) {
        return hiService.sayHi(name);
    }
}
